import { createRouter, createWebHashHistory } from 'vue-router'
import HomeView from '../views/HomeView.vue'
// 你可以选择性地延迟加载 AboutView，如果你希望的话
// import AboutView from '../views/AboutView.vue'

const routes = [
  {
    path: '/',
    name: 'home',
    component: HomeView
  },
  {
    path: '/about',
    name: 'about',
    // 如果你希望延迟加载这个组件，你可以使用动态导入
    component: () => import('../views/AboutView.vue')
    // 如果你没有延迟加载的需求，你可以直接导入组件
    // component: AboutView
  }
]

const router = createRouter({
  history: createWebHashHistory(),
  routes
})

export default router
